import request from "@/utils/request";
import { da } from "element-plus/es/locales.mjs";

//查询商品单位列表
export function listProductUnit(query) {
  return request({
    url: "/product/productUnit/list",
    method: "get",
    params: query,
  });
}

//新增商品单位
export function addProductUnit(data) {
  return request({
    url: "/product/productUnit",
    method: "post",
    data: data,
  });
}

//根据id查询商品单位的详细信息
export function getProductUnitdetail(id) {
  return request({
    url: "/product/productUnit/" + id,
    method: "get",
  });
}

//修改商品单位
export function updateProductUnit(data) {
  return request({
    url: "/product/productUnit",
    method: "put",
    data: data,
  });
}

//删除商品单位
export function deleteProductUnit(id) {
  return request({
    url: "/product/productUnit/" + id,
    method: "delete",
  });
}
